Replacing hideUploadButton param inside SendBox.tsx with disableFileUpload to also hide file upload DropZone as well as button#5508
Conversation
Currently, if user passes in true for SendBox hideUploadButton param, only the attachment button itself is hidden, but the file dropzone button is not disabled and user can still drag and drop a file to be uploaded. These change is meant to also disable the dropzone so prevent file upload when this param is set to true. |
SendBox.tsx - added hideUploadButton boolean to DropZone |
@microsoft-github-policy-service agree [company="Microsoft"] |
|
I'm ok with the change, @compulim are you ok, do you think MCS is ok with such? |
|
We don't expect everyone magically to switch to the new option. We should leave the old one with deprecation note mentioning the removal date (to be removed on or later than 2 years from now which is july 2027). |
|
OEvgeny
left a comment
There was a problem hiding this comment.
I'm going to do some changes in the PR
- change condition to hide upload button even if hideUploadButton is not set - fix white label layout when button hidden - revert test changes - add missing test variants - changelog touch-ups
|
@JamesNewbyAtMicrosoft to pass CLA you should send it without quotes or any other markup AFAIK. |
Co-authored-by: Eugene <EOlonov@gmail.com>
Changelog Entry
Description
Currently, if user passes in true for SendBox hideUploadButton param, only the attachment button itself is hidden, but the file dropzone button is not disabled and user can still drag and drop a file to be uploaded. These change are meant to also disable the dropzone so prevent file upload and thereby fully disable webchat's file upload ability, therefore the name change as well.
Design
Specific Changes
Fully replaced all uses of hideUploadButton param with disableFileUpload.
SendBox.tsx - added replaced disableFileUpload boolean to DropZone to additionally prevent file upload when true
hideAttachFileButton.html - renamed and replaced this test (changed to hideAttachFileButtonAndDisableDropZone), adding a test to check for DropZone now showing when disableFileUpload param is true.
-
CHANGELOG.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed